package com.juhuixing.auth.server.controller;

import org.springframework.security.oauth2.provider.OAuth2Authentication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.security.Principal;

/**
 * 功能描述: 必须要有，做验证
 * @author: 刘猛
 * @date: 2019/2/20 16:58
 **/
@RestController
public class UserController {

    @RequestMapping("/user")
    public Principal user(OAuth2Authentication user) {
        return user;
    }
}
